<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSystemGroupsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('system_groups', function (Blueprint $table) {
            $table->id()->comment('组合数据表');
//            $table->integer('category_id')->index()->comment('分类id');
            $table->string('name',50)->comment('数据组合名称');
            $table->string('info')->comment('数据简介');
            $table->string('config_name',50)->comment('数据字段');
            $table->json('fields')->nullable()->comment('数据组字段以及类型（json数据）');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('system_groups');
    }
}
